<template>
  <!-- d2-container 文档 https://fairyever.com/d2-admin/doc/zh/sys-components/container.html -->
  <d2-container class="page-<%= name %>">
    <template slot="header"><%= name %></template>
    <%_ blocks.forEach(function(block) { _%>
    <<%= block.name %>/>
    <%_ }); _%>
    <template slot="footer">自动生成 <%= blocks.length %> 个组件</template>
  </d2-container>
</template>

<script>
// 组件
<%_ blocks.forEach(function(block) { _%>
import <%= block.className %> from '<%= block.path %>'
<%_ }); _%>
// 请删除下面代码中你不需要的部分
export default {
  name: '<%= name %>',
  components: {
    <%_ blocks.forEach(function(block, index) { _%>
    <%= block.className %><%= index !== blocks.length - 1 ? ',' : '' %>
    <%_ }); _%>
  },
  // 数据
  data () {
    return {}
  },
  // 计算属性
  computed: {},
  // 侦听器
  watch: {},
  // 生命周期钩子
  beforeCreate () {},
  created () {},
  beforeMount () {},
  mounted () {},
  beforeUpdate () {},
  updated () {},
  activated () {},
  deactivated () {},
  beforeDestroy () {},
  destroyed () {},
  // 事件处理方法
  methods: {}
}
</script>

<style lang="scss" scoped>
@import './<%= upperName %>.scss';
</style>
